<?php

/**
 * LEAGUEMan
 * 
 * Copyright (C) 2007 Marko Bischof
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

?>

<form action="index2.php" method="post" name="adminForm">
	<table cellpadding="4" cellspacing="0" border="0" width="100%">
		<tr>
			<td width="100%" class="sectionname">Seasons</td>
			<td nowrap="nowrap">
				<fieldset>
					<legend>QuickAdd</legend>
					<input type="text" name="season_name" size="25" value="" class="inputbox" />
					<input type="button" name="" class="button" value="Save" onClick="javascript:submitbutton('quickadd');" />
				</fieldset>
			</td>
		</tr>
	</table>
	
	<table class="adminlist">
		<tr>
			<th width="1%">
				<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $this->rows ); ?>);" />
			</th>
			<th width="84%" class="title"><?php echo 'Name';?></th>
			<th width="15%" colspan="2"><?php echo 'Reorder';?></th>
		</tr>
<?php
	$k = 1;
	for ($i = 0, $n = count( $this->rows ); $i < $n; $i++) {
		$row = &$this->rows[$i];
		$k = 1 - $k;
?>
		<tr class="<?php echo "row$k"; ?>">
			<td align="center">
        		<input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $row->season_id; ?>" onclick="isChecked(this.checked);" />
			</td>
			<td>
				<a href="#edit" onclick="return listItemTask('cb<?php echo $i;?>','edit')">
					<?php echo $row->season_name; ?>
				</a>
			</td>
			<td align="center">
<?php
		if ($i > 0 || ($i + $this->pageNav->limitstart > 0)) { ?>
        		<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderup')">
        			<img src="images/uparrow.png" width="12" height="12" border="0" alt="Move Up">
        		</a>
<?php
		} else { ?>
				&nbsp;
<?php
		}
?>
			</td>
      		<td>
<?php		
		if ($i < $n - 1 || $i + $this->pageNav->limitstart < $this->pageNav->total - 1) { ?>
        		<a href="#reorder" onClick="return listItemTask('cb<?php echo $i;?>','orderdown')">
        			<img src="images/downarrow.png" width="12" height="12" border="0" alt="Move Down">
        		</a>
<?php
		} else { ?>
				&nbsp;
<?php
		}
?>
			</td>
		</tr>
<?php
	} 
?>
	</table>
	<?php echo $this->pageNav->getListFooter(); ?>
	<input type="hidden" name="option" value="com_leagueman" />
	<input type="hidden" name="act" value="seasons" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
</form>